import React, { useState } from "react";
import Button from "@knownsec/react-component/dist/Button";
import Dialog from "@kuiper-components/dialog";
import s from './style.module.css'
import cn from 'classnames'

function WafErrorDialog ({ className }) {
	const [ipVisible, setIpVisible] = useState(false)
	return <>
		<Button type='text' onClick={() => {
				setIpVisible(true);
			}} className={cn('p0', className)}>扫描IP</Button>
		<Dialog
			title="扫描器IP地址"
			className={s.deldia}
			visible={ipVisible}
			onClose={() => {
				setIpVisible(false);
			}}
			destroyOnClose={true}
		>
			<div className={s.cont}>
				<div className={s.cont2}>
					<p className={s.ipTypeP}>
						<span>IPv4:</span>
						<span>182.140.244.222</span>
					</p>
					<p className={s.ipTypeP}>
						<span>IPv6:</span>
						<span>240e:d9:a003:1602::/64</span>
					</p>
				</div>
				<div className={s.footer}>
					<Button
						type='primary'
						onClick={() => {
							setIpVisible(false);
						}}
					>
						确定
					</Button>
				</div>
			</div>
		</Dialog>
	</>
}
export default WafErrorDialog
